Microsoft .NET Framework SDK QuickStart Configuration Details
This page provides a detailed listing of the configuration steps performed by the .NET Framework QuickStart configuration program. It also contains solutions to common problems related to the samples setup.
General SQL Server/MSDE Information
In order for the database access samples to function properly, a named instance of Microsoft SQL Server 2000 Desktop Engine (MSDE) is required. To download and install the Microsoft SQL Server 2000 Desktop Engine, please follow the instructions on the Microsoft .NET Framework SDK MSDE help page.
The MSDE instance name used by the SDK samples is 'NetSDK'. To access the database, use the server name: (local)\NetSDK.
to SQL ServerFour databases are used throughout the QuickStarts: The two SQL demo databases: Pubs and NorthWind; And two custom databases: GrocerToGo and Portal. The SQL scripts to install these database are provided in the <SDK>\Samples\Setup directory. To manually install these four databases, run the following commands from the command line. Note: The path to the osql.exe command must be located in your PATH environment variable.
osql -E -S (local)\NetSDK -i InstPubs.sql
osql -E -S (local)\NetSDK -i InstNwnd.sql
osql -E -S (local)\NetSDK -i Portal.sql
osql -E -S (local)\NetSDK -i Grocer.sql
The ASP.NET process runs under a specific account.
In order for the data access samples to access the database, this
account must be granted rights to the sample databases.
If the operating system is part of the Windows Server 2003 family the ASP.NET process runs under NT AUTHORITY\NETWORK SERVICE
account. In all other cases it runs under MACHINENAME\ASPNET account.
To manually grant access to the ASPNET user run the following commands from
the command line.
osql -E -S (local)\NetSDK -Q "sp_grantlogin <ASP.NET User Account>"
osql -E -S (local)\NetSDK -d Pubs -Q "sp_grantdbaccess <ASP.NET User Account>"
osql -E -S (local)\NetSDK -d Pubs -Q "sp_addrolemember 'db_owner', <ASP.NET User Account>"
osql -E -S (local)\NetSDK -d NorthWind -Q "sp_grantdbaccess <ASP.NET User Account>"
osql -E -S (local)\NetSDK -d NorthWind -Q "sp_addrolemember 'db_owner', <ASP.NET User Account>"
osql -E -S (local)\NetSDK -d Portal -Q "sp_grantdbaccess <ASP.NET User Account>"
osql -E -S (local)\NetSDK -d Portal -Q "sp_addrolemember 'db_owner', <ASP.NET User Account>"
osql -E -S (local)\NetSDK -d GrocerToGo -Q "sp_grantdbaccess <ASP.NET User Account>"
osql -E -S (local)\NetSDK -d GrocerToGo -Q "sp_addrolemember 'db_owner', <ASP.NET User Account>"
Note: The path to the osql.exe command must be located in your PATH environment variable.
Starting MSDE
The QuickStart Tutorials that demonstrate database access require
that MSDE is started. If MSDE is stopped, most samples will throw a, "Timeout
expired" or "SQL Sever does not exist or access denied"
error. To start MSDE:
If database files with the same filename already exist on the hard
drive, the samples configuration utility will not overwrite/replace these
files.
2a. Complete the instructions outlined in the Adding the SQL Server Databases to SQL Server and
Granting Access to the ASPNET user sections above.
net start MSSQL$NetSDK
Pre-Existing Data Files 1. Delete or rename the following files from the
C:\Program Files\Microsoft SQL Server\MSSQL$NetSDK\Data directory.
2b. Or, run the samples configuration utility
again.
Modify the sourceview node of the Web.Config file in the QuickStart subdirectory to reflect the samples installation directory.
. . .
<sourceview>
<add key="root" value="C:\Program
Files\Microsoft.NET\SDK\v1.1\QuickStart" />
</sourceview>
. . .
Setting the NetSamplePath Environment Variable
The NetSamplePath environment variable is required to compile the QuickStart samples. Set the NetSamplePath environment variable to <SDK> directory. The <SDK> directory name must be in the short form (no spaces). For an example of what NetSamplePath should be set to, see the SDKVars.bat file located in the <SDK>\Bin directory.
The process of setting an environment variable varies depending on your operating system. In general, the command is:
SET NetSamplePath=D:\PROGRA~1\MICROS~1.NET\SDK\v1.1\
Most of the QuickStart tutorials are shipped with compiled exe's and
dll's. However, there are a few samples that require compilation on the
local computer. Specifically, these are samples that register components,
install assemblies into the Global Assembly Cache, or demonstrate COM
Interop. To compile these samples, run the Register.bat command located
in the <SDK>\QuickStart directory.
The QuickStart tutorials are written in ASP.NET and require IIS. If IIS was not installed prior to installing the SDK, ASP.NET pages will not display properly. To install IIS and ASP.NET, complete the following steps:
Creating the IIS Virtual Directories
The QuickStart configuration program creates several IIS virtual directories/web applications. If you would like to manually create these, a complete list is provided below. The paths for the virtual directories all stem from the <SDK> directory.
For example:
C:\Program Files\Microsoft.NET\SDK\v1.1\QuickStart
All the virtual roots/web applications are created with IIS IP security restrictions. You will only be able to browse the virtual directories via localhost (i.e. http://localhost/quickstart). To turn off this restriction, modify the virtual directory's IP Security property in Internet Services Manager. Note: Windows 2000/XP Professional users, this functionality is disabled in Internet Services Manager. Use the WebIPSetting.exe tool located in the <SDK>\Samples\Setup\Tools folder to reset your IP security settings.
Virtual Directories
QuickStart
MobileQuickStart
Web Applications
QuickStart\ASPPlus
QuickStart\WinForms
QuickStart\HowTo
QuickStart\ASPPlus\Samples\grocertogo\CS
QuickStart\ASPPlus\Samples\grocertogo\VB
QuickStart\ASPPlus\Samples\grocertogo\JS
QuickStart\ASPPlus\Samples\portal\CS
QuickStart\ASPPlus\Samples\portal\VB
QuickStart\ASPPlus\Samples\portal\JS
QuickStart\ASPPlus\Samples\apps\application1\CS
QuickStart\ASPPlus\Samples\apps\application1\JS
QuickStart\ASPPlus\Samples\apps\application1\VB
QuickStart\ASPPlus\Samples\apps\application2\JS
QuickStart\ASPPlus\Samples\apps\application2\CS
QuickStart\ASPPlus\Samples\apps\application2\VB
QuickStart\ASPPlus\Samples\apps\session1\CS
QuickStart\ASPPlus\Samples\apps\session1\JS
QuickStart\ASPPlus\Samples\apps\session1\VB
QuickStart\ASPPlus\Samples\security\cookieauth\CS
QuickStart\ASPPlus\Samples\security\cookieauth\VB
QuickStart\ASPPlus\Samples\security\cookieauth\JS
QuickStart\ASPPlus\Samples\security\userauth\CS
QuickStart\ASPPlus\Samples\security\userauth\VB
QuickStart\ASPPlus\Samples\security\userauth\JS
QuickStart\ASPPlus\Samples\security\windowsauth\CS
QuickStart\ASPPlus\Samples\security\windowsauth\VB
QuickStart\ASPPlus\Samples\security\windowsauth\JS
QuickStart\ASPPlus\Samples\localize\resources
QuickStart\ASPPlus\Samples\localize\resources\News\CS
QuickStart\ASPPlus\Samples\localize\resources\News\VB
QuickStart\ASPPlus\Samples\localize\resources\News\JS
QuickStart\ASPPlus\Samples\vstudio\security\cookieauth\CS
QuickStart\ASPPlus\Samples\vstudio\security\cookieauth\VB
QuickStart\ASPPlus\Samples\vstudio\services\dataservice\CS
QuickStart\ASPPlus\Samples\vstudio\services\dataservice\VB
QuickStart\ASPPlus\Samples\vstudio\services\datatypes\CS
QuickStart\ASPPlus\Samples\vstudio\services\datatypes\VB
QuickStart\ASPPlus\Samples\vstudio\services\intrinsics\CS
QuickStart\ASPPlus\Samples\vstudio\services\intrinsics\VB
QuickStart\ASPPlus\Samples\vstudio\services\mathservice\CS
QuickStart\ASPPlus\Samples\vstudio\services\mathservice\VB
QuickStart\ASPPlus\Samples\vstudio\webforms\customize\CS
QuickStart\ASPPlus\Samples\vstudio\webforms\customize\VB
QuickStart\ASPPlus\Samples\vstudio\webforms\data\CS
QuickStart\ASPPlus\Samples\vstudio\webforms\data\VB
QuickStart\ASPPlus\Samples\vstudio\webforms\pagelets\CS
QuickStart\ASPPlus\Samples\vstudio\webforms\pagelets\VB
QuickStart\ASPPlus\Samples\vstudio\webforms\validate\CS
QuickStart\ASPPlus\Samples\vstudio\webforms\validate\VB
QuickStart\WinForms\Samples\Data\MasterDetails\CS
QuickStart\WinForms\Samples\Data\MasterDetails\VB
QuickStart\WinForms\Samples\Data\Update\CS
QuickStart\WinForms\Samples\Data\Update\VB
QuickStart\WinForms\Samples\Data\WebServiceBinding\CS
QuickStart\WinForms\Samples\Data\WebServiceBinding\VB
MobileQuickStart\samples\security\VB
MobileQuickStart\samples\security\CS
MobileQuickStart\samples\security\JS
Removing the IIS Virtual Directories
Uninstalling the SDK will not remove the IIS Virtual Directories created by the Samples Configuration Tool. To remove the virtual directories, complete the following steps:
Switching Between the v1.0 and v1.1 QuickStarts
Because the v1.0 and v1.1 QuickStarts share the same IIS Virtual Directory, they can not be run concurrently (side-by-side). To switch between the v1.0 and the v1.1 QuickStarts, perform the following steps:
The example below presumes switching FROM v1.1 TO v1.0.
If you have installed the v1.0 version of the Microsoft Mobile Internet Toolkit (MMIT) QuickStarts and want to switch to the v1.0 MMIT QuickStarts, follow the following steps:
Running the QuickStarts on the Windows Server 2003 family
Note: If you are installing the QuickStarts on a Windows Server 2003 family machine, ASP.NET Web Server Extensions must be 'Allowed' for the QuickStarts to work. See the 'Enabling and Disabling Dynamic Content' section of the IIS help documentation for more information.
The ASP.NET Quickstart Localization samples require several fonts (e.g. Japanese) to view the samples correctly. The installation procedure for these fonts may require the original Windows CD. To install new fonts, complete the following steps:
On Windows 2000
On Windows XP